1. Field of the Invention
The present invention relates to a semiconductor device having a JTAG (Joint Test Action Group) port.
2. Description of the Background Art
In recent years, some of semiconductor devices such as a system LSI (Large Scale Integration) have JTAG ports as interfaces for connecting inspection devices. The semiconductor devices are also provided with memories such as a flash ROM (Read-Only Memory) in their inside that have security bits so that the security bits prevent program sequences stored in memories from being read out and rewritten through their JTAG ports.
In this kind of semiconductor device, when its security bit is enabled, access from its JTAG port to its inside is cut off so as to prevent programs stored in a memory from being read out and rewritten.
Well, even if the semiconductor device switches the security bit to its enabled state after writing a finished program, the program may need to rewritten due to the discovery of a bug or change in its specifications.
However, in this kind of semiconductor device, when the security bit is enabled and the access from its JTAG port to its inside is cut off, it may be disadvantageous that the semiconductor device must be abandoned, and that, according to circumstances, a whole apparatus including the semiconductor device must be replaced.
Japanese Patent No. 3760087 discloses a semiconductor device that enables access from its JTAG port to its inside in spite of a state that its security bit is enabled. The semiconductor device in the Japanese patent is provided with general-purpose ports. In the semiconductor device, when an input state resultant from decoding the state on one or more of the general-purpose ports matches a predetermined pattern, access from its JTAG port to its inside is enabled.
A microcomputer disclosed in the Japanese patent laid-open publication No. 2002-183108 enables access from its JTAG port to its inside in spite of a state that its security bit is enabled when data having a predetermined pattern is inputted to the JTAG port.
According to the Japanese patent and laid-open publication described above, even if a security bit is enabled, access from the JTAG port of the device to the inside allows rewriting the security bit to be disabled so that a program sequence stored in its inside can be read out and rewritten.
However, in the Japanese patent and laid-open publication described above, it is disadvantageous to not necessarily heighten security effect because access from the JTAG port to the inside allows a program sequence to be read out and rewritten when the security bit is disabled.